<template>
</template>

<script>
	export default{
		data(){
			return{
				
			}
		},
		onLoad(options) {
			console.log(options)
			console.log("充值参数1",JSON.parse(decodeURIComponent(options.parmas)))
			var data = JSON.parse(decodeURIComponent(options.parmas))
			uni.requestPayment({
				...data,
				timeStamp:  data.signType == 'RSA' ?  data.timeStamp.toString() : data.timestamp.toString() ,
				// timeStamp: data.timestamp.toString(),
				// nonceStr: data.nonceStr,
				// package: data.package,
				// signType: 'MD5',
				// paySign: data.paySign,
				success: function (resu) {
					console.log('success');
					uni.showToast({
						title:'支付成功'
					})
				},
				fail: function (res) {
					console.log('fail');
				},
				complete() {
					uni.redirectTo({
						url:'/gc_school/pages/home/index'
					})
					// uni.navigateTo({
					//     url: '/gc_school/pages/webview/index?url=' + data.url,
					// })
				}
			});
		}
	}
</script>

<style>
</style>